package org.discala.samples.complex.domain

import MealType._
import PreparationMethod._

/**
 * @author Chris Turner
 */
class Recipe(val mealType: MealType) {

  private[this] val ingredients = scala.collection.mutable.Set[Ingredient]()

  var preparationMethod: PreparationMethod = Stand

  def ingredientCount = ingredients.size
  def <<(ingredient: Ingredient): Unit = ingredients += ingredient

  def eachIngredient(func: (Ingredient) => Unit) = ingredients.foreach { func(_) }
}